﻿{{ define "cms/blocklist.html" }}

{{template "cms/head.html"}}

<body>

<!-- Start wrapper-->
<div id="wrapper">
  {{template "cms/sidebar.html" .}}

  {{template "cms/topbar.html" .}}

  <div class="clearfix"></div>
  <div class="content-wrapper">
    <div class="container-fluid">
      <!-- top buttons -->
      <div class="row">
        <div class="col-lg-12">
          <a href="/cms/blockadd.html">新建板块</a>
          <a href="/cms/index.html">回到首页</a>
        </div>
      </div>
      <!--end top buttons -->

      <!-- main table infos -->
      <div class="row" style="min-height: 500px">
        <div class="col-lg-12">
          <table class="table table-bordered table-hover">
            <thead>
              <tr>
                <th scope="col">序号</th>
                <th scope="col">顶级版块</th>
                <th scope="col">题目</th>
                <th scope="col">状态</th>
                <th scope="col">增加时间</th>
                <th scope="col">编辑时间</th>
                <th scope="col"></th>
              </tr>
            </thead>
            <tbody>
              {{range .content}}
              <tr>
                <td scope="row">{{.Id}}</td>
                <td scope="row">{{.Parentid}}</td>
                <td>{{.Title}}</td>
                <td>{{if eq $.defset.state.debug.code .State}}未发布{{else if eq $.defset.state.release.code     .State}}已发布{{else}}板块状态有误{{end}}</td>
                <td>{{.Addtime}}</td>
                <td>{{.Edittime}}</td>
                <td><a href="/cms/blockedit.html?id={{.Id}}">编辑板块</a></td>
              </tr>
              {{end}}
            </tbody>
          </table>
        </div>
      </div>
      <!--end main table infos -->

      <!-- page info -->
      <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
          <div id=pageNums>
            页码&nbsp;
            {{range .pageIndexs}}
              <a href="/cms/blocklist.html?page={{.}}&perpage={{$.perpage}}">{{.}}</a>
            {{end}}
          </div>
        </div>
      </div>
      <!-- end page info-->
      
      <!--start overlay-->
      <div class="overlay toggle-menu"></div>
      <!--end overlay-->
    </div>
    <!-- End container-fluid-->

  </div><!--End content-wrapper-->

  <!--Start Back To Top Button-->
  <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
  <!--End Back To Top Button-->
	
  {{template "cms/footer.html"}}
	
</div><!--End wrapper-->

  {{template "cms/tail.html"}} <!-- javascripts -->

</body>
</html>
{{ end }}
